package PTA.MainXDX.ex01;

import PTA.Mianxiangduixiang.ex42.P;

import java.util.Scanner;

class Person{
    private String name;
    private int age;
    private boolean gender;
    private int id;

    public Person() {
        System.out.println("This is constructor");
        System.out.println(name+","+age+","+gender+","+id);
        System.out.println("Person [name="+name+","+" age="+age+" gender="+gender+" id="+id+"]");
    }

    public Person(String name, int age, boolean gender, int id) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.id = id;
    }
    public Person(String name, int age, boolean gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;

    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public boolean isGender() {
        return gender;
    }

    public void setGender(boolean gender) {
        this.gender = gender;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public String toString() {
        System.out.println("Person [name="+this.name+", age="+this.age+", gender="+this.gender+", id="+0+"]");
        return "1";
    }
}


public class ex01 {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
int n = sc.nextInt();
Person p[] = new Person[n];
for(int i=0;i<p.length;i++){
    String name = sc.next();
    int age = sc.nextInt();
    boolean gender = sc.nextBoolean();
    p[i] = new Person(name,age,gender);
}
for(int i=p.length-1;i>=0;i--){
    p[i].toString();
}
        new Person();



    }
}
